<!DOCTYPE html>
<html lang="cn" class="js csstransforms3d">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="generator" content="Hugo 0.37.1" />
    <meta name="description" content="">


    <link rel="shortcut icon" href="https://shardingsphere.apache.org/document/legacy/3.x/document/img/favicon.png" type="image/x-icon" />

    <title>应用性能监控 :: ShardingSphere</title>
    
    
    <link href="https://shardingsphere.apache.org/document/legacy/3.x/document/css/nucleus.css?1547543307" rel="stylesheet">
    <link href="https://shardingsphere.apache.org/document/legacy/3.x/document/css/font-awesome.min.css?1547543307" rel="stylesheet">
    <link href="https://shardingsphere.apache.org/document/legacy/3.x/document/css/hybrid.css?1547543307" rel="stylesheet">
    <link href="https://shardingsphere.apache.org/document/legacy/3.x/document/css/featherlight.min.css?1547543307" rel="stylesheet">
    <link href="https://shardingsphere.apache.org/document/legacy/3.x/document/css/perfect-scrollbar.min.css?1547543307" rel="stylesheet">
    <link href="https://shardingsphere.apache.org/document/legacy/3.x/document/css/auto-complete.css?1547543307" rel="stylesheet">
    <link href="https://shardingsphere.apache.org/document/legacy/3.x/document/css/theme.css?1547543307" rel="stylesheet">
    <link href="https://shardingsphere.apache.org/document/legacy/3.x/document/css/hugo-theme.css?1547543307" rel="stylesheet">
    
      <link href="https://shardingsphere.apache.org/document/legacy/3.x/document/css/theme-black.css?1547543307" rel="stylesheet">
    

    <script src="https://shardingsphere.apache.org/document/legacy/3.x/document/js/jquery-2.x.min.js?1547543307"></script>
    
    <style type="text/css">
      :root #header + #content > #left > #rlblock_left{ 
          display:none !important;
      }
      
    </style>
    

  </head>
  <body class="" data-url="/cn/features/orchestration/apm/">
    <nav id="sidebar" class="">



  <div id="header-wrapper">
    <div id="header">
      <img src="https://shardingsphere.apache.org/document/legacy/3.x/document/img/logo_v2.png" />

    </div>
    
  </div>

    <div class="highlightable">
    <ul class="topics">

        
          
          


 
  
    
    <li data-nav-id="/cn/overview/" title="概览" class="dd-item 
        
        
        
        ">
      <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/overview/">
          <b>1. </b>概览
          
      </a>
      
              
    </li>
  
 

          
          


 
  
    
    <li data-nav-id="/cn/quick-start/" title="快速入门" class="dd-item 
        
        
        
        ">
      <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/quick-start/">
          <b>2. </b>快速入门
          
      </a>
      
      
        <ul>
          
          
          
          
        
          
            
            


 
  
    
      <li data-nav-id="/cn/quick-start/sharding-jdbc-quick-start/" title="Sharding-JDBC" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/quick-start/sharding-jdbc-quick-start/">
        <b>2.1. </b>Sharding-JDBC
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/cn/quick-start/sharding-proxy-quick-start/" title="Sharding-Proxy" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/quick-start/sharding-proxy-quick-start/">
        <b>2.2. </b>Sharding-Proxy
        
        </a>
    </li>
     
  
 

            
          
        
        </ul>
              
    </li>
  
 

          
          


 
  
    
    <li data-nav-id="/cn/features/" title="概念 &amp; 功能" class="dd-item 
        parent
        
        
        ">
      <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/features/">
          <b>3. </b>概念 &amp; 功能
          
      </a>
      
      
        <ul>
          
          
            
          
          
          
        
          
            
            


 
  
    
    <li data-nav-id="/cn/features/sharding/" title="数据分片" class="dd-item 
        
        
        
        ">
      <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/features/sharding/">
          <b>3.1. </b>数据分片
          
      </a>
      
      
        <ul>
          
          
            
          
          
          
        
          
            
            


 
  
    
    <li data-nav-id="/cn/features/sharding/concept/" title="核心概念" class="dd-item 
        
        
        
        ">
      <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/features/sharding/concept/">
          <b>3.1.1. </b>核心概念
          
      </a>
      
      
        <ul>
          
          
          
          
        
          
            
            


 
  
    
      <li data-nav-id="/cn/features/sharding/concept/sql/" title="SQL" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/features/sharding/concept/sql/">
        SQL
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/cn/features/sharding/concept/sharding/" title="分片" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/features/sharding/concept/sharding/">
        分片
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/cn/features/sharding/concept/configuration/" title="配置" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/features/sharding/concept/configuration/">
        配置
        
        </a>
    </li>
     
  
 

            
          
        
        </ul>
              
    </li>
  
 

            
          
            
            


 
  
    
    <li data-nav-id="/cn/features/sharding/principle/" title="内核剖析" class="dd-item 
        
        
        
        ">
      <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/features/sharding/principle/">
          <b>3.1.2. </b>内核剖析
          
      </a>
      
      
        <ul>
          
          
          
          
        
          
            
            


 
  
    
      <li data-nav-id="/cn/features/sharding/principle/parse/" title="解析引擎" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/features/sharding/principle/parse/">
        解析引擎
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/cn/features/sharding/principle/route/" title="路由引擎" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/features/sharding/principle/route/">
        路由引擎
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/cn/features/sharding/principle/rewrite/" title="改写引擎" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/features/sharding/principle/rewrite/">
        改写引擎
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/cn/features/sharding/principle/execute/" title="执行引擎" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/features/sharding/principle/execute/">
        执行引擎
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/cn/features/sharding/principle/merge/" title="归并引擎" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/features/sharding/principle/merge/">
        归并引擎
        
        </a>
    </li>
     
  
 

            
          
        
        </ul>
              
    </li>
  
 

            
          
            
            


 
  
    
    <li data-nav-id="/cn/features/sharding/use-norms/" title="使用规范" class="dd-item 
        
        
        
        ">
      <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/features/sharding/use-norms/">
          <b>3.1.3. </b>使用规范
          
      </a>
      
      
        <ul>
          
          
          
          
        
          
            
            


 
  
    
      <li data-nav-id="/cn/features/sharding/use-norms/sql/" title="SQL" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/features/sharding/use-norms/sql/">
        SQL
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/cn/features/sharding/use-norms/pagination/" title="分页" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/features/sharding/use-norms/pagination/">
        分页
        
        </a>
    </li>
     
  
 

            
          
        
        </ul>
              
    </li>
  
 

            
          
            
            


 
  
    
    <li data-nav-id="/cn/features/sharding/other-features/" title="其他功能" class="dd-item 
        
        
        
        ">
      <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/features/sharding/other-features/">
          <b>3.1.4. </b>其他功能
          
      </a>
      
      
        <ul>
          
          
          
          
        
          
            
            


 
  
    
      <li data-nav-id="/cn/features/sharding/other-features/inline-expression/" title="行表达式" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/features/sharding/other-features/inline-expression/">
        行表达式
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/cn/features/sharding/other-features/key-generator/" title="分布式主键" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/features/sharding/other-features/key-generator/">
        分布式主键
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/cn/features/sharding/other-features/sharding-hint/" title="强制分片路由" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/features/sharding/other-features/sharding-hint/">
        强制分片路由
        
        </a>
    </li>
     
  
 

            
          
        
        </ul>
              
    </li>
  
 

            
          
        
        </ul>
              
    </li>
  
 

            
          
            
            


 
  
    
    <li data-nav-id="/cn/features/read-write-split/" title="读写分离" class="dd-item 
        
        
        
        ">
      <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/features/read-write-split/">
          <b>3.2. </b>读写分离
          
      </a>
      
      
        <ul>
          
          
          
          
        
          
            
            


 
  
    
      <li data-nav-id="/cn/features/read-write-split/concept/" title="核心概念" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/features/read-write-split/concept/">
        <b>3.2.1. </b>核心概念
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/cn/features/read-write-split/core-features/" title="核心功能" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/features/read-write-split/core-features/">
        <b>3.2.2. </b>核心功能
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/cn/features/read-write-split/unsupported-items/" title="不支持项" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/features/read-write-split/unsupported-items/">
        <b>3.2.3. </b>不支持项
        
        </a>
    </li>
     
  
 

            
          
        
        </ul>
              
    </li>
  
 

            
          
            
            


 
  
    
    <li data-nav-id="/cn/features/orchestration/" title="数据治理" class="dd-item 
        parent
        
        
        ">
      <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/features/orchestration/">
          <b>3.3. </b>数据治理
          
      </a>
      
      
        <ul>
          
          
          
          
        
          
            
            


 
  
    
      <li data-nav-id="/cn/features/orchestration/config-center/" title="配置中心" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/features/orchestration/config-center/">
        <b>3.3.1. </b>配置中心
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/cn/features/orchestration/orchestration/" title="编排治理" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/features/orchestration/orchestration/">
        <b>3.3.2. </b>编排治理
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/cn/features/orchestration/supported-registry-repo/" title="支持的注册中心" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/features/orchestration/supported-registry-repo/">
        <b>3.3.3. </b>支持的注册中心
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/cn/features/orchestration/apm/" title="应用性能监控" class="dd-item active">
        <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/features/orchestration/apm/">
        <b>3.3.4. </b>应用性能监控
        
        </a>
    </li>
     
  
 

            
          
        
        </ul>
              
    </li>
  
 

            
          
            
            


 
  
    
    <li data-nav-id="/cn/features/transaction/" title="分布式事务" class="dd-item 
        
        
        
        ">
      <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/features/transaction/">
          <b>3.4. </b>分布式事务
          
      </a>
      
      
        <ul>
          
          
          
          
        
          
            
            


 
  
    
      <li data-nav-id="/cn/features/transaction/local-transaction/" title="本地事务" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/features/transaction/local-transaction/">
        <b>3.4.1. </b>本地事务
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/cn/features/transaction/2pc-transaction/" title="两阶段事务" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/features/transaction/2pc-transaction/">
        <b>3.4.2. </b>两阶段事务
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/cn/features/transaction/base-transaction/" title="柔性事务" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/features/transaction/base-transaction/">
        <b>3.4.3. </b>柔性事务
        
        </a>
    </li>
     
  
 

            
          
        
        </ul>
              
    </li>
  
 

            
          
        
        </ul>
              
    </li>
  
 

          
          


 
  
    
    <li data-nav-id="/cn/manual/" title="使用手册" class="dd-item 
        
        
        
        ">
      <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/manual/">
          <b>4. </b>使用手册
          
      </a>
      
      
        <ul>
          
          
            
          
          
          
        
          
            
            


 
  
    
    <li data-nav-id="/cn/manual/sharding-jdbc/" title="Sharding-JDBC" class="dd-item 
        
        
        
        ">
      <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/manual/sharding-jdbc/">
          <b>4.1. </b>Sharding-JDBC
          
      </a>
      
      
        <ul>
          
          
            
          
          
          
        
          
            
            


 
  
    
    <li data-nav-id="/cn/manual/sharding-jdbc/usage/" title="使用手册" class="dd-item 
        
        
        
        ">
      <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/manual/sharding-jdbc/usage/">
          <b>4.1.1. </b>使用手册
          
      </a>
      
      
        <ul>
          
          
          
          
        
          
            
            


 
  
    
      <li data-nav-id="/cn/manual/sharding-jdbc/usage/sharding/" title="数据分片" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/manual/sharding-jdbc/usage/sharding/">
        数据分片
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/cn/manual/sharding-jdbc/usage/read-write-splitting/" title="读写分离" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/manual/sharding-jdbc/usage/read-write-splitting/">
        读写分离
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/cn/manual/sharding-jdbc/usage/hint/" title="强制路由" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/manual/sharding-jdbc/usage/hint/">
        强制路由
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/cn/manual/sharding-jdbc/usage/orchestration/" title="数据治理" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/manual/sharding-jdbc/usage/orchestration/">
        数据治理
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/cn/manual/sharding-jdbc/usage/transaction/" title="分布式事务" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/manual/sharding-jdbc/usage/transaction/">
        分布式事务
        
        </a>
    </li>
     
  
 

            
          
        
        </ul>
              
    </li>
  
 

            
          
            
            


 
  
    
    <li data-nav-id="/cn/manual/sharding-jdbc/configuration/" title="配置手册" class="dd-item 
        
        
        
        ">
      <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/manual/sharding-jdbc/configuration/">
          <b>4.1.2. </b>配置手册
          
      </a>
      
      
        <ul>
          
          
          
          
        
          
            
            


 
  
    
      <li data-nav-id="/cn/manual/sharding-jdbc/configuration/config-java/" title="Java配置" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/manual/sharding-jdbc/configuration/config-java/">
        Java配置
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/cn/manual/sharding-jdbc/configuration/config-yaml/" title="Yaml配置" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/manual/sharding-jdbc/configuration/config-yaml/">
        Yaml配置
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/cn/manual/sharding-jdbc/configuration/config-spring-boot/" title="Spring Boot配置" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/manual/sharding-jdbc/configuration/config-spring-boot/">
        Spring Boot配置
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/cn/manual/sharding-jdbc/configuration/config-spring-namespace/" title="Spring命名空间配置" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/manual/sharding-jdbc/configuration/config-spring-namespace/">
        Spring命名空间配置
        
        </a>
    </li>
     
  
 

            
          
        
        </ul>
              
    </li>
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/cn/manual/sharding-jdbc/unsupported-items/" title="JDBC不支持项" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/manual/sharding-jdbc/unsupported-items/">
        <b>4.1.3. </b>JDBC不支持项
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/cn/manual/sharding-jdbc/stress-test/" title="性能测试报告" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/manual/sharding-jdbc/stress-test/">
        <b>4.1.4. </b>性能测试报告
        
        </a>
    </li>
     
  
 

            
          
        
        </ul>
              
    </li>
  
 

            
          
            
            


 
  
    
    <li data-nav-id="/cn/manual/sharding-proxy/" title="Sharding-Proxy" class="dd-item 
        
        
        
        ">
      <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/manual/sharding-proxy/">
          <b>4.2. </b>Sharding-Proxy
          
      </a>
      
      
        <ul>
          
          
          
          
        
          
            
            


 
  
    
      <li data-nav-id="/cn/manual/sharding-proxy/usage/" title="使用手册" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/manual/sharding-proxy/usage/">
        <b>4.2.1. </b>使用手册
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/cn/manual/sharding-proxy/configuration/" title="配置手册" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/manual/sharding-proxy/configuration/">
        <b>4.2.2. </b>配置手册
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/cn/manual/sharding-proxy/docker/" title="Docker镜像" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/manual/sharding-proxy/docker/">
        <b>4.2.3. </b>Docker镜像
        
        </a>
    </li>
     
  
 

            
          
        
        </ul>
              
    </li>
  
 

            
          
            
            


 
  
    
    <li data-nav-id="/cn/manual/sharding-sidecar/" title="Sharding-Sidecar" class="dd-item 
        
        
        
        ">
      <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/manual/sharding-sidecar/">
          <b>4.3. </b>Sharding-Sidecar
          
      </a>
      
              
    </li>
  
 

            
          
        
        </ul>
              
    </li>
  
 

          
          


 
  
    
    <li data-nav-id="/cn/faq/" title="FAQ" class="dd-item 
        
        
        
        ">
      <a href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/faq/">
          <b>5. </b>FAQ
          
      </a>
      
              
    </li>
  
 

          
         
    </ul>

    
    

    
    <section id="prefooter">
      <hr/>
      <ul>
      
        <li>
          <a class="padding">
            <i class="fa fa-fw fa-language"></i>
          <div class="select-style">
            <select id="select-language" onchange="location = this.value;">
          
          
          
              
              
                  
                    
                    
<option id="en" value="/document/legacy/3.x/document/en/features/orchestration/apm/">English</option>
                    
                  
              
                  
              
          
              
              
                  
              
                  
                    
                    
<option id="cn" value="/document/legacy/3.x/document/cn/features/orchestration/apm/" selected>Chinese</option>
                    
                  
              
          
        </select>
        <svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
          width="255px" height="255px" viewBox="0 0 255 255" style="enable-background:new 0 0 255 255;" xml:space="preserve">
          <g>
            <g id="arrow-drop-down">
              <polygon points="0,63.75 127.5,191.25 255,63.75 		" />
            </g>
          </g>
        </svg>
        </div>
        </a>
        </li>
       
      
      
      </ul>
    </section>
    
    <section id="footer">
      <p></p>

    </section>
  </div>
</nav>





        <section id="body">
        <div id="overlay"></div>
        <div class="padding highlightable">
              
              <div>
                <div id="top-bar">
                
                
                <div id="breadcrumbs" itemscope="" itemtype="http://data-vocabulary.org/Breadcrumb">
                    <span id="sidebar-toggle-span">
                        <a href="#" id="sidebar-toggle" data-sidebar-toggle="">
                          <i class="fa fa-bars"></i>
                        </a>
                    </span>
                  
                  <span id="toc-menu"><i class="fa fa-list-alt"></i></span>
                  
                  <span class="links">
                    
          
          
            
            
          
          
            
            
          
          
            
            
          
          
            <a href='https://shardingsphere.apache.org/document/legacy/3.x/document/cn/'>ShardingSphere</a> > <a href='https://shardingsphere.apache.org/document/legacy/3.x/document/cn/features/'>概念 & 功能</a> > <a href='https://shardingsphere.apache.org/document/legacy/3.x/document/cn/features/orchestration/'>数据治理</a> > 应用性能监控
          
         
          
         
          
         
          
           
                  </span>
                </div>
                
                    <div class="progress">
    <div class="wrapper">
<nav id="TableOfContents">
<ul>
<li>
<ul>
<li><a href="#背景">背景</a></li>
<li><a href="#使用方法">使用方法</a>
<ul>
<li><a href="#使用opentracing协议">使用OpenTracing协议</a></li>
<li><a href="#使用skywalking自动探针">使用SkyWalking自动探针</a></li>
</ul></li>
<li><a href="#效果展示">效果展示</a>
<ul>
<li><a href="#应用架构">应用架构</a></li>
<li><a href="#拓扑图展示">拓扑图展示</a></li>
<li><a href="#跟踪数据展示">跟踪数据展示</a></li>
<li><a href="#异常情况展示">异常情况展示</a></li>
</ul></li>
</ul></li>
</ul>
</nav>
    </div>
</div>

                
              </div>
            </div>
            

        
        <div id="body-inner">
          
            <h1>应用性能监控</h1>
          

        




<h2 id="背景">背景</h2>

<p><code>APM</code>是应用性能监控的缩写。目前<code>APM</code>的主要功能着眼于分布式系统的性能诊断，其主要功能包括调用链展示，应用拓扑分析等。</p>

<p>ShardingSphere并不负责如何采集、存储以及展示应用性能监控的相关数据，而是将SQL解析与SQL执行这两块数据分片的最核心的相关信息发送至应用性能监控系统，并交由其处理。
换句话说，ShardingSphere仅负责产生具有价值的数据，并通过标准协议递交至相关系统。ShardingSphere可以通过两种方式对接应用性能监控系统。</p>

<p>第一种方式是使用OpenTracing API发送性能追踪数据。面向OpenTracing协议的APM产品都可以和ShardingSphere自动对接，比如SkyWalking，Zipkin和Jaeger。使用这种方式只需要在启动时配置OpenTracing协议的实现者即可。
它的优点是可以兼容所有的与OpenTracing协议兼容的产品作为APM的展现系统，如果采用公司愿意实现自己的APM系统，也只需要实现OpenTracing协议，即可自动展示ShardingSphere的链路追踪信息。
缺点是OpenTracing协议发展并不稳定，较新的版本实现者较少，且协议本身过于中立，对于个性化的相关产品的实现不如原生支持强大。</p>

<p>第二种方式是使用SkyWalking的自动探针。
<a href="http://shardingsphere.apache.org/">ShardingSphere</a>团队与<a href="https://skywalking.apache.org/">SkyWalking</a>团队共同合作，在<code>SkyWalking</code>中实现了<code>ShardingSphere</code>自动探针，可以将相关的应用性能数据自动发送到<code>SkyWalking</code>中。</p>

<h2 id="使用方法">使用方法</h2>

<h3 id="使用opentracing协议">使用OpenTracing协议</h3>

<ul>
<li>方法1：通过读取系统参数注入APM系统提供的Tracer实现类</li>
</ul>

<p>启动时添加参数</p>

<pre><code>    -Dio.shardingsphere.opentracing.tracer.class=org.apache.skywalking.apm.toolkit.opentracing.SkywalkingTracer
</code></pre>

<p>调用初始化方法</p>

<pre><code class="language-java">    ShardingTracer.init();
</code></pre>

<ul>
<li>方法2：通过参数注入APM系统提供的Tracer实现类</li>
</ul>

<pre><code class="language-java">    ShardingTracer.init(new SkywalkingTracer());
</code></pre>

<p><em>注意:使用SkyWalking的OpenTracing探针时，应将原ShardingSphere探针插件禁用，以防止两种插件互相冲突</em></p>

<h3 id="使用skywalking自动探针">使用SkyWalking自动探针</h3>

<p>请参考<a href="https://github.com/apache/skywalking/blob/5.x/docs/cn/Quick-start-CN.md">SkyWalking部署手册</a>。</p>

<h2 id="效果展示">效果展示</h2>

<p>无论使用哪种方式，都可以方便的将APM信息展示在对接的系统中，以下以SkyWalking为例。</p>

<h3 id="应用架构">应用架构</h3>

<p>使用<code>Sharding-Proxy</code>访问两个数据库<code>192.168.0.1:3306</code>和<code>192.168.0.2:3306</code>，且每个数据库中有两个分表。</p>

<h3 id="拓扑图展示">拓扑图展示</h3>

<p><img src="https://shardingsphere.apache.org/document/legacy/3.x/document/img/apm/5x_topology.png" alt="拓扑图" /></p>

<p>从图中看，用户访问18次Sharding-Proxy应用，每次每个数据库访问了两次。这是由于每次访问涉及到每个库中的两个分表，所以每次访问了四张表。</p>

<h3 id="跟踪数据展示">跟踪数据展示</h3>

<p><img src="https://shardingsphere.apache.org/document/legacy/3.x/document/img/apm/5x_trace.png" alt="跟踪图" /></p>

<p>从跟踪图中可以能够看到SQL解析和执行的情况。</p>

<p><code>/Sharding-Sphere/parseSQL/</code> : 表示本次SQL的解析性能。</p>

<p><img src="https://shardingsphere.apache.org/document/legacy/3.x/document/img/apm/5x_parse.png" alt="解析节点" /></p>

<p><code>/Sharding-Sphere/executeSQL/</code> : 表示具体执行的实际SQL的性能。</p>

<p><img src="https://shardingsphere.apache.org/document/legacy/3.x/document/img/apm/5x_executeSQL.png" alt="实际访问节点" /></p>

<h3 id="异常情况展示">异常情况展示</h3>

<p><img src="https://shardingsphere.apache.org/document/legacy/3.x/document/img/apm/5x_trace_err.png" alt="异常跟踪图" /></p>

<p>从跟踪图中可以能够看到发生异常的节点。</p>

<p><code>/Sharding-Sphere/executeSQL/</code> : 表示执行SQL异常的结果。</p>

<p><img src="https://shardingsphere.apache.org/document/legacy/3.x/document/img/apm/5x_executeSQL_Tags_err.png" alt="异常节点" /></p>

<p><code>/Sharding-Sphere/executeSQL/</code> : 表示执行SQL异常的日志。</p>

<p><img src="https://shardingsphere.apache.org/document/legacy/3.x/document/img/apm/5x_executeSQL_Logs_err.png" alt="异常节点日志" /></p>


<footer class=" footline" >
	
</footer>


        
        </div> 
        

      </div>

    <div id="navigation">
        
        
        
        
            
            
                
                    
                    
                
                

                    
                    
                        
                    
                    

                    
                        
            
            
                
                    
                        
                        
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
            
        
                    
                        
            
            
                
                    
                    
                
                

                    
                    
                        
                    
                    

                    
                        
            
            
                
                    
                        
                        
                    
                
                

                    
                    
                        
                    
                    

                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
            
        
                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
            
        
                    
                        
            
            
                
                    
                    
                
                

                    
                    
                    

                    
                        
            
            
                
                    
                        
                        
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                    
                
                

                    
                    
                    

                    
            
        
                    
            
        
                    
                        
            
            
                
                    
                        
                        
                    
                
                

                    
                    
                    

                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
            
        
                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                        
                    
                    

                    
                        
            
            
                
                    
                
                

                    
                    
                        
                    
                    

                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
            
        
        
        


        
            <a class="nav nav-prev" href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/features/orchestration/supported-registry-repo/" title="支持的注册中心"> <i class="fa fa-chevron-left"></i></a>
        
        
            <a class="nav nav-next" href="https://shardingsphere.apache.org/document/legacy/3.x/document/cn/features/transaction/" title="分布式事务" style="margin-right: 0px;"><i class="fa fa-chevron-right"></i></a>
        
    </div>

    </section>
    
    <div style="left: -1000px; overflow: scroll; position: absolute; top: -1000px; border: none; box-sizing: content-box; height: 200px; margin: 0px; padding: 0px; width: 200px;">
      <div style="border: none; box-sizing: content-box; height: 200px; margin: 0px; padding: 0px; width: 200px;"></div>
    </div>
    <script src="https://shardingsphere.apache.org/document/legacy/3.x/document/js/clipboard.min.js?1547543307"></script>
    <script src="https://shardingsphere.apache.org/document/legacy/3.x/document/js/perfect-scrollbar.min.js?1547543307"></script>
    <script src="https://shardingsphere.apache.org/document/legacy/3.x/document/js/perfect-scrollbar.jquery.min.js?1547543307"></script>
    <script src="https://shardingsphere.apache.org/document/legacy/3.x/document/js/jquery.sticky.js?1547543307"></script>
    <script src="https://shardingsphere.apache.org/document/legacy/3.x/document/js/featherlight.min.js?1547543307"></script>
    <script src="https://shardingsphere.apache.org/document/legacy/3.x/document/js/html5shiv-printshiv.min.js?1547543307"></script>
    <script src="https://shardingsphere.apache.org/document/legacy/3.x/document/js/highlight.pack.js?1547543307"></script>
    <script>hljs.initHighlightingOnLoad();</script>
    <script src="https://shardingsphere.apache.org/document/legacy/3.x/document/js/modernizr.custom.71422.js?1547543307"></script>
    <script src="https://shardingsphere.apache.org/document/legacy/3.x/document/js/learn.js?1547543307"></script>
    <script src="https://shardingsphere.apache.org/document/legacy/3.x/document/js/hugo-learn.js?1547543307"></script>

    <link href="https://shardingsphere.apache.org/document/legacy/3.x/mermaid/mermaid.css?1547543307" type="text/css" rel="stylesheet" />
    <script src="https://shardingsphere.apache.org/document/legacy/3.x/mermaid/mermaid.js?1547543307"></script>
    <script>
        mermaid.initialize({ startOnLoad: true });
    </script>
    

  </body>
</html>

